
const cloud = require('wx-server-sdk')

cloud.init()

let db = cloud.database()

exports.main = async (event, context) => {
  return await db.collection('orderStatus')
    .where({
      _id: event._id
    })
    .update({
      data: {
        canPressOrder:event.canPressOrder,
        isHideOrderButton:event.isHideOrderButton,
        isOrdered:event.isOrdered,
        orderNow:event.orderNow
      }
    })
}